package org.lw.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.lw.server.common.RespBean;
import org.lw.server.pojo.Admin;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Looveh
 * @since 2022-01-22
 */
public interface IAdminService extends IService<Admin> {

    /**
     * 登录之后返回token
     *
     * @param username
     * @param password
     * @param code
     * @param request
     * @return {@link RespBean}
     * @author looveh
     * @date 2022/1/22 14:30
    **/
    RespBean login(String username, String password, String code, HttpServletRequest request);

    /**
     * 根据用户名获取用户信息
     *
     * @param username
     * @return {@link Admin}
     * @author looveh
     * @date 2022/1/22 14:43
    **/
    Admin getAdminByUsername(String username);
}
